package com.Qinmeiwei.web.pojo.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the dynamic table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="dynamic"
 */

public abstract class BaseDynamic  implements Serializable {

	public static String REF = "Dynamic";
	public static String PROP_IS_ANONYMOUS = "isAnonymous";
	public static String PROP_REFUSE = "refuse";
	public static String PROP_TYPE = "type";
	public static String PROP_CREATE_TIME = "createTime";
	public static String PROP_PRIVILEGE = "privilege";
	public static String PROP_ID = "id";
	public static String PROP_USER_NAME = "userName";
	public static String PROP_SOURCE_DESC = "sourceDesc";
	public static String PROP_USER_ID = "userId";
	public static String PROP_TARGET_USER_NAME = "targetUserName";
	public static String PROP_TARGET_USER_ID = "targetUserId";
	public static String PROP_EVENT_CODE = "eventCode";


	// constructors
	public BaseDynamic () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseDynamic (java.lang.String id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseDynamic (
		java.lang.String id,
		com.Qinmeiwei.web.pojo.DynamicType eventCode,
		java.lang.String userId,
		java.lang.String userName,
		java.lang.String targetUserId,
		java.util.Date createTime,
		java.lang.Byte privilege,
		java.lang.String type,
		java.lang.Byte isAnonymous) {

		this.setId(id);
		this.setEventCode(eventCode);
		this.setUserId(userId);
		this.setUserName(userName);
		this.setTargetUserId(targetUserId);
		this.setCreateTime(createTime);
		this.setPrivilege(privilege);
		this.setType(type);
		this.setIsAnonymous(isAnonymous);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String id;

	// fields
	private java.lang.String userId;
	private java.lang.String userName;
	private java.lang.String targetUserId;
	private java.lang.String targetUserName;
	private java.lang.String sourceDesc;
	private java.util.Date createTime;
	private java.lang.Byte privilege;
	private java.lang.String type;
	private java.lang.String refuse;
	private java.lang.Byte isAnonymous;

	// many to one
	private com.Qinmeiwei.web.pojo.DynamicType eventCode;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="id"
     */
	public java.lang.String getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: user_id
	 */
	public java.lang.String getUserId () {
		return userId;
	}

	/**
	 * Set the value related to the column: user_id
	 * @param userId the user_id value
	 */
	public void setUserId (java.lang.String userId) {
		this.userId = userId;
	}



	/**
	 * Return the value associated with the column: user_name
	 */
	public java.lang.String getUserName () {
		return userName;
	}

	/**
	 * Set the value related to the column: user_name
	 * @param userName the user_name value
	 */
	public void setUserName (java.lang.String userName) {
		this.userName = userName;
	}



	/**
	 * Return the value associated with the column: target_user_id
	 */
	public java.lang.String getTargetUserId () {
		return targetUserId;
	}

	/**
	 * Set the value related to the column: target_user_id
	 * @param targetUserId the target_user_id value
	 */
	public void setTargetUserId (java.lang.String targetUserId) {
		this.targetUserId = targetUserId;
	}



	/**
	 * Return the value associated with the column: target_user_name
	 */
	public java.lang.String getTargetUserName () {
		return targetUserName;
	}

	/**
	 * Set the value related to the column: target_user_name
	 * @param targetUserName the target_user_name value
	 */
	public void setTargetUserName (java.lang.String targetUserName) {
		this.targetUserName = targetUserName;
	}



	/**
	 * Return the value associated with the column: source_desc
	 */
	public java.lang.String getSourceDesc () {
		return sourceDesc;
	}

	/**
	 * Set the value related to the column: source_desc
	 * @param sourceDesc the source_desc value
	 */
	public void setSourceDesc (java.lang.String sourceDesc) {
		this.sourceDesc = sourceDesc;
	}



	/**
	 * Return the value associated with the column: create_time
	 */
	public java.util.Date getCreateTime () {
		return createTime;
	}

	/**
	 * Set the value related to the column: create_time
	 * @param createTime the create_time value
	 */
	public void setCreateTime (java.util.Date createTime) {
		this.createTime = createTime;
	}



	/**
	 * Return the value associated with the column: privilege
	 */
	public java.lang.Byte getPrivilege () {
		return privilege;
	}

	/**
	 * Set the value related to the column: privilege
	 * @param privilege the privilege value
	 */
	public void setPrivilege (java.lang.Byte privilege) {
		this.privilege = privilege;
	}



	/**
	 * Return the value associated with the column: type
	 */
	public java.lang.String getType () {
		return type;
	}

	/**
	 * Set the value related to the column: type
	 * @param type the type value
	 */
	public void setType (java.lang.String type) {
		this.type = type;
	}



	/**
	 * Return the value associated with the column: refuse
	 */
	public java.lang.String getRefuse () {
		return refuse;
	}

	/**
	 * Set the value related to the column: refuse
	 * @param refuse the refuse value
	 */
	public void setRefuse (java.lang.String refuse) {
		this.refuse = refuse;
	}



	/**
	 * Return the value associated with the column: is_anonymous
	 */
	public java.lang.Byte getIsAnonymous () {
		return isAnonymous;
	}

	/**
	 * Set the value related to the column: is_anonymous
	 * @param isAnonymous the is_anonymous value
	 */
	public void setIsAnonymous (java.lang.Byte isAnonymous) {
		this.isAnonymous = isAnonymous;
	}



	/**
	 * Return the value associated with the column: event_code
	 */
	public com.Qinmeiwei.web.pojo.DynamicType getEventCode () {
		return eventCode;
	}

	/**
	 * Set the value related to the column: event_code
	 * @param eventCode the event_code value
	 */
	public void setEventCode (com.Qinmeiwei.web.pojo.DynamicType eventCode) {
		this.eventCode = eventCode;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.Qinmeiwei.web.pojo.Dynamic)) return false;
		else {
			com.Qinmeiwei.web.pojo.Dynamic dynamic = (com.Qinmeiwei.web.pojo.Dynamic) obj;
			if (null == this.getId() || null == dynamic.getId()) return false;
			else return (this.getId().equals(dynamic.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}